package com.zzq.my.jetpacks.jectpackapp.ui.fragment

import android.os.Bundle
import android.view.View
import androidx.viewbinding.ViewBinding
import by.kirich1409.viewbindingdelegate.viewBinding
import com.aisier.architecture.base.BaseFragment
import com.jennifer.andy.androidxlazyload.demo.adapter.FragmentLazyStatePageAdapter
import com.zzq.my.jetpacks.jectpackapp.*
import com.zzq.my.jetpacks.jectpackapp.databinding.FragmentCBinding

/**
 * 描述：class describe
 * 作者：zhuangzeqin
 * 时间: 2021/12/27-16:44
 * 邮箱：zzq@eeepay.cn
 * 备注:
 */
class CFragment:BaseFragment(R.layout.fragment_c) {
    private val bindView by viewBinding(FragmentCBinding::bind)

    companion object{
        fun newInStance()=CFragment()//
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        bindView.viewPager.apply {
            adapter = FragmentLazyStatePageAdapter(childFragmentManager, generateTextFragments(4),generateTextFragmentTitles(4))
        }.also {
            bindView.tabLayout.setupWithViewPager(it)//关联viewpage
        }

    }

    override fun lazyInit() {

    }
}